package com.reesechou.service.imp;

import com.reesechou.dao.ArticleDao;
import com.reesechou.javabean.Article;
import com.reesechou.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 小星打屁屁 on 2015/3/25.
 * contact me ==>243709758@qq.com
 */
@Service
public class ArticleServiceImp implements ArticleService {
    @Autowired
    private ArticleDao articleDao ;
    @Override
    public int insert(Article entity) {
        return articleDao.insert(entity) ;
    }

    @Override
    public boolean delete(Article entity) {
        return false;
    }

    @Override
    public boolean deleteAllPage() {
        return false;
    }

    @Override
    public Article queryById(int id) {
        return articleDao.findById(id);
    }

    @Override
    public boolean update(Article entity) {
        return false;
    }

    @Override
    public List<Article> findPage() {
        return articleDao.findPage();
    }

    @Override
    public List<Article> getAllArticle() {
        return articleDao.findAllArticle();
    }

    @Override
    public List<Article> findNavMenuItem() {
        return null;
    }

    @Override
    public List<Article> findNewestArticle() {
        return articleDao.findNewestArticle();
    }

    @Override
    public List<Article> findByFuzzyName(String key) {
        return null;
    }
}
